package Day2025_04_19;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;

public class Demo03 {
    public int citys (ArrayList<ArrayList<Integer>> m) {
        // write code here
        int n = m.size();
        int[][] flag = new int[n][n];
        Queue<Integer> q = new LinkedList<>();
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                if (i != j) flag[i][j] = m.get(i).get(j);
            }
        }
        for (int i = 0; i < n; i++) {
            int[] arr = new int[n];
            for (int j = 0; j < n; j++) {
                if (flag[i][j] == 1) {
                    q.add(j);
                    flag[i][j] = 0;
                    flag[j][i] = 0;
                }
            }
            int sz = q.size();
            for (int k = 0; k < sz; k++) {
                int ret = q.poll();

            }
        }
        return 0;
    }
}
